package otherBefore.visitor.visitor;

import otherBefore.visitor.Node.NodeA;
import otherBefore.visitor.Node.NodeB;

/**
 * @author sps
 * @date 2023/5/9 9:48
 */
public class VisitorA implements Visitor {
    /**
     * 对应于NodeA的访问操作
     */
    @Override
    public void visit(NodeA node) {
        System.out.println(node.operationA());
    }
    /**
     * 对应于NodeB的访问操作
     */
    @Override
    public void visit(NodeB node) {
        System.out.println(node.operationB());
    }

}
